import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store,{key} from './store'
import installElementPlus,{ Size } from './plugins/element'
// , { Size }
import { ElMessageBox, ElMessage, ElNotification } from 'element-plus'
import 'normalize.css/normalize.css'
import '@/styles/index.scss'
import initSvgIcon from '@/icons/index'

const app = createApp(App)

const size=store.state.app.size
// installElementPlus(app)
app
.use(store,key)
.use(router)
.use(installElementPlus,{size})
.use(initSvgIcon)
.mount('#app')


declare module '@vue/runtime-core' {
    interface ComponentCustomProperties {
      $message: typeof ElMessage;
      $notify: typeof ElNotification;
      $confirm: typeof ElMessageBox.confirm;
      $alert: typeof ElMessageBox.alert;
      $prompt: typeof ElMessageBox.prompt;
      $ELEMENT:{
        size:Size
      }
    }
  }
  
